/* 
 * Copyright (C) 2014 Ningbo Yuanqun Inc., All Rights Reserved. 
 */
package com.yuanqunsoft.alimigration.engine.vo;

import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonProperty;

public class Alert implements Serializable {

    /**
	 * 
	 */
    private static final long serialVersionUID = 3101219882687372491L;
    
    @JsonProperty(value = "aleResource")
    private String resource;
    
    @JsonProperty(value = "aleLine")
    private int line;

    public Alert() {

    }

    public Alert(String resource, int line) {
        this.resource = resource;
        this.line = line;
    }

    public String getResource() {
        return resource;
    }

    public void setResource(String resource) {
        this.resource = resource;
    }

    public int getLine() {
        return line;
    }

    public void setLine(int line) {
        this.line = line;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + line;
        result = prime * result + ((resource == null) ? 0 : resource.hashCode());
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        Alert other = (Alert) obj;
        if (line != other.line)
            return false;
        if (resource == null) {
            if (other.resource != null)
                return false;
        } else if (!resource.equals(other.resource))
            return false;
        return true;
    }

    @Override
    public String toString() {
        return "Alert [resource=" + resource + ", line=" + line + "]";
    }

}
